<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="../../public/bootstrap/bootstrap.min.css">
    <link rel="stylesheet" href="../../public/bootstrap/bootstrap.min.js">
</head>
<style>
    label{
        font-size: 13px;
    }

</style>
<body>
<div style="background-color: #636b6f;height: 350px;width: 300px;margin: 200px auto;border-radius: 10px;padding: 20px">
    <form action="insert" method="get">
        @csrf
        <table>
            <tr>
                <td><label>姓名：</label></td>
                <td>
                    <input type="text" name="name" value="{{isset($ok)?$ok->name:''}}">
                    <input type="hidden" name="id" value="{{isset($ok)?$ok->id:''}}">
                </td>
            </tr>


            <tr>
                <td><label>年龄：</label></td>
                <td><input type="text" name="age"  value="{{isset($ok)?$ok->age:''}}"></td>
            </tr>


            <tr>
                <td><label>性别：</label></td>
                <td>
                    <input type="radio" name="sex"  {{isset($ok)?($ok->sex==1?'checked':''):''}} value="1"><label>男</label>&nbsp;&nbsp;&nbsp;
                    <input type="radio" name="sex"  {{isset($ok)?($ok->sex==2?'checked':''):''}} value="2"><label>女</label>&nbsp;&nbsp;&nbsp;
                    <input type="radio" name="sex"  {{isset($ok)?($ok->sex==3?'checked':''):''}} value="3"><label>保密</label>&nbsp;&nbsp;&nbsp;
                </td>
            </tr>


            <tr>
                <td><label>家乡</label></td>
                <td><select name="country" value="" style="width: 165px;font-size: 13px">
                        <option selected><label>--请选择--</label></option>
                        <option  {{isset($ok)?($ok->country==1?'selected':''):''}}  value="1">乌鲁木齐</option>
                        <option  {{isset($ok)?($ok->country==2?'selected':''):''}}  value="2">库尔勒</option>
                        <option  {{isset($ok)?($ok->country==3?'selected':''):''}}  value="3">昌吉</option>
                        <option  {{isset($ok)?($ok->country==4?'selected':''):''}}  value="4">吐鲁番</option>
                        <option  {{isset($ok)?($ok->country==5?'selected':''):''}}  value="5">阿克苏</option>
                        <option  {{isset($ok)?($ok->country==6?'selected':''):''}}  value="6">阿勒泰</option>
                        <option  {{isset($ok)?($ok->country==7?'selected':''):''}}  value="7">伊利</option>
                        <option  {{isset($ok)?($ok->country==8?'selected':''):''}}  value="8">塔城</option>
                        <option  {{isset($ok)?($ok->country==9?'selected':''):''}}  value="9">喀什</option>
                        <option  {{isset($ok)?($ok->country==10?'selected':''):''}} value="10"><label>和田</label></option>
                        <option  {{isset($ok)?($ok->country==11?'selected':''):''}} value="11"><label>哈密</label></option>
                        <option  {{isset($ok)?($ok->country==12?'selected':''):''}} value="12"><label>克州</label></option>
                    </select>
                </td>
            </tr>


            <tr>
                <td><label>爱好：</label></td>
                <td>
                    <input  type="checkbox" name="hobby[]" {{isset($ok)?((in_array('1',explode("#",$ok->hobby))?'checked':'')):''}} value="1"><label>读书</label>
                    <input  type="checkbox" name="hobby[]" {{isset($ok)?((in_array('2',explode("#",$ok->hobby))?'checked':'')):''}} value="2"><label>看电影</label>
                    <input  type="checkbox" name="hobby[]" {{isset($ok)?((in_array('3',explode("#",$ok->hobby))?'checked':'')):''}} value="3"><label>逛街</label><br>
                    <input  type="checkbox" name="hobby[]" {{isset($ok)?((in_array('4',explode("#",$ok->hobby))?'checked':'')):''}} value="4"><label>旅游</label>
                    <input  type="checkbox" name="hobby[]" {{isset($ok)?((in_array('5',explode("#",$ok->hobby))?'checked':'')):''}} value="5"><label>游泳</label>
                    <input  type="checkbox" name="hobby[]" {{isset($ok)?((in_array('6',explode("#",$ok->hobby))?'checked':'')):''}} value="6"><label>其他</label>
                </td>
            </tr>


            <tr>
                <td><label>自我介绍：</label></td>
                <td><textarea name="description" cols="20" rows="2">{{isset($ok)?$ok->description:''}}</textarea></td>
            </tr>


            <tr>
                <td colspan="2">
                   <div style="margin-left: 50px;margin-top: 20px;width: 220px">
                       <input  value="提交" type="submit" style="margin: auto 10px;background-color: #0897a9;border: none;border-radius: 5px;height: 30px;width: 80px;color: white" >
                       <input  value="重置" type="reset"  style="margin: auto 10px;background-color: #ff6200;border: none;border-radius: 5px;height: 30px;width:  80px;color: white" >
                   </div>
                </td>

            </tr>


        </table>
    </form>
</div>
</body>
</html>
